﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace Genko.Model
{
	/// <summary>
	/// Represents an ordered collection of members
	/// </summary>
	public abstract class MemberCollection : IEnumerable<Member>
	{
		protected internal Member owner = null;

		protected internal MemberCollection()
		{

		}

		protected internal MemberCollection(Member owner)
		{
			this.owner = owner;
		}

		public virtual Member Owner
		{
			get { return this.owner; }
		}

		public abstract int Count { get; }

		IEnumerator IEnumerable.GetEnumerator()
		{
			IEnumerator<Member> ie = this.GetEnumerator();
			return ie;
		}

		public abstract IEnumerator<Member> GetEnumerator();
	}
}
